package com.interceptor;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;


public class MyTimer extends AbstractInterceptor {
    @Override
    public void init() {
        System.out.println("初始化");
    }

    @Override
    public void destroy() {
        System.out.println("销毁");
    }

    @Override
    public String intercept(ActionInvocation a) throws Exception {
        System.out.println("开始");
        String resout = a.invoke();
        System.out.println("结束");
        return resout;
    }

}
